<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 24716
  Date: 2023/4/8
  Time: 10:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>user  index page</title>
</head>
<body>
<h1>welcome to </h1>
<h1>goods list</h1>
<table border="1">
    <tr>
        <th>ID</th>
        <th>BRAND</th>
        <th colspan="1">OPTIONS</th>
    </tr>
    <c:forEach var="goods" items="${sessionScope.goodss}">
    <tr>
        <td>${goods.id}</td>
        <td>${goods.brand}</td>
        <td><a href="/goods/queryGoods/${goods.id}">details</a> </td>
    </tr>
    </c:forEach>
</table>
    <hr>
    <form action="/goods/queryByBrand" method="post">
        <input type="text" name="brand" placeholder="search" >
        <input type="submit" value="search">
    </form>
    <p style="color: red">${sessionScope.error1}</p>
    <c:forEach var="goods" items="${sessionScope.goods1}" >
    <a href="/goods/queryBrandSearch/${goods.brand}">${goods.brand}</a>
    <br>
    </c:forEach>
</body>
</html>
